import React, { Component } from 'react';
import {BrowserRouter as Router,NavLink,Route,Switch} from 'react-router-dom'
import './App.css'
import Home from './Home.jsx';
import User from './User.jsx';
import About from './About.jsx';
class App extends Component {
  render() {
    return (
      <div className='bottom'>
        <Router className='bottom-nav'>
          <NavLink activeClassName='active' to='/home'>首页</NavLink>
          <NavLink activeClassName='active'  to='/user'>用户</NavLink>
          <NavLink activeClassName='active'  to='/about'>关于</NavLink>
          <Switch>
          <Route exact path='/' component={Home}></Route>
          <Route exact path='/home' component={Home}></Route>
         <Route exact path='/user' component={User}></Route>
         <Route exact path='/about' component={About}></Route> 
         </Switch>
        </Router>
      </div>
    );
  }
}

export default App;
